package com.kehutong.charge.util.enums;

import org.coraframework.util.HashID;

/**
 * @program: kht
 * @description: 住户类型类型
 * @author: joneron
 * @create: 2021/7/5
 **/
public enum ResidentsTypeEnum implements HashID {

    OWNER("1", "业主"),
    FRIEND("2", "家属"),
    LESSEE ("3", "租客")
    ;


    private final String id;
    private final String desc ;

    private ResidentsTypeEnum(String id, String desc) {
        this.id = id;
        this.desc = desc ;
    }


    public static ResidentsTypeEnum getEnum(String id){
        for (ResidentsTypeEnum value : ResidentsTypeEnum.values()) {
            if(value.id.equals(id)){
                return value;
            }
        }
        return null;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
